<template>
    <div class="body jobFindDetail" v-if="JSON.stringify(conData) != '{}'">
        <!-- 顶部 -->
        <dl class="box cm_top_box">
            <dd>
                <img :src="conData.company_info.logo" alt="" />
            </dd>
            <dt>
                <h1>{{ conData.company_info.companyname }}</h1>
                <h2>
                    {{ conData.company_info.district_cn }} |
                    {{ conData.company_info.nature_cn }} |
                    {{ conData.company_info.trade_cn }}
                </h2>
                <h3>
                    <li
                        v-for="(item, index) in conData.company_info.tag_arr"
                        :key="index"
                    >
                        {{ item }}
                    </li>
                </h3>
            </dt>
        </dl>
        <!-- 公告 -->
        <div class="box cm_gg">求职过程中请勿缴纳费用，谨防诈骗</div>
        <!-- 详情1 -->
        <div class="box jfd_content">
            <h1>公司介绍</h1>
            <p>{{ conData.company_info.contents }}</p>
        </div>

        <div class="box" style="padding: 0; overflow: hidden">
            <component :is="'Map'" :company="conData.company_info"></component>
        </div>

        <div class="j_title">
            <span>在招职位</span>
        </div>

        <div class="j_gxzw">
            <div v-if="conData.jobs_list.length > 0">
                <a
                    class="j_gx_li"
                    v-for="(item, index) in conData.jobs_list"
                    :key="index"
                    @click="
                        $router.push({
                            path: '/jobFindDetail',
                            query: { id: item.id },
                        })
                    "
                >
                    <h1>
                        <span>{{ item.jobs_name }}</span>
                        <i>{{ item.wage_cn }}</i>
                    </h1>
                    <h2>{{ item.companyname }}</h2>
                    <h3>
                        <span v-for="(li, i) in item.tag_cn" :key="i">{{
                            li
                        }}</span>
                    </h3>
                    <h4>
                        <span>
                            <img
                                src="../../assets/newimg/index/home_icon_huo@2x.png"
                                alt=""
                            />
                            <!-- <b>{{ item.contact.contact }}</b> -->
                        </span>
                        <i>{{ item.district_cn }}</i>
                    </h4>
                </a>
            </div>
        </div>
        <div class="zhanwei"></div>
    </div>
</template>

<script>
import { axiosGet } from '../../axios';
import { Toast } from 'vant';
export default {
    name: '',
    data() {
        return {
            conData: {},
        };
    },
    computed: {},
    mounted() {
        this.getJianliYindao();
    },
    methods: {
        // 获取企业信息数据
        getJianliYindao() {
            axiosGet(
                '/apis/company/detail',
                {
                    id: this.$route.query.id,
                },
                (res) => {
                    // console.log(res);
                    if (res.status != 1) {
                        return Toast({
                            message: res.msg,
                            duration: 2000,
                        });
                    }
                    this.conData = res.data;
                }
            );
        },
    },
};
</script>

<style lang="less" src="../../assets/css/job.less" scope></style>
<style lang="less" scoped>
.j_title {
    padding: 0 0.64rem;
}
</style>
